package com.csweimei.rentmanagementtreasure.http.entity;

import com.csweimei.rentmanagementtreasure.utils.ValidateUtils;
import com.google.gson.annotations.SerializedName;

import java.util.List;

public class EntScheduleBean extends BaseResult{
    @SerializedName("data")
    private List<DataDTO> data;

    public List<DataDTO> getData() {
        return data;
    }

    public void setData(List<DataDTO> data) {
        this.data = data;
    }

    public static class DataDTO {
        @SerializedName("date")
        private String date;
        @SerializedName("allList")
        private List<AllListDTO> allList;

        public String getDate() {
            return date;
        }

        public void setDate(String date) {
            this.date = date;
        }

        public List<AllListDTO> getAllList() {
            return allList;
        }

        public void setAllList(List<AllListDTO> allList) {
            this.allList = allList;
        }

        public static class AllListDTO {
            @SerializedName("id")
            private int id;
            @SerializedName("housingID")
            private String housingID;
            @SerializedName("category")
            private String category;
            @SerializedName("sid")
            private String sid;
            @SerializedName("userid")
            private int userid;
            @SerializedName("nickname")
            private String nickname;
            @SerializedName("title")
            private String title;
            @SerializedName("Type")
            private String type;
            @SerializedName("time")
            private String time;

            public int getId() {
                return id;
            }

            public void setId(int id) {
                this.id = id;
            }

            public String getHousingID() {
                return housingID;
            }

            public void setHousingID(String housingID) {
                this.housingID = housingID;
            }

            public String getCategory() {
                return category;
            }

            public void setCategory(String category) {
                this.category = category;
            }

            public String getSid() {
                return sid;
            }

            public void setSid(String sid) {
                this.sid = sid;
            }

            public int getUserid() {
                return userid;
            }

            public void setUserid(int userid) {
                this.userid = userid;
            }

            public String getNickname() {
                return nickname;
            }

            public void setNickname(String nickname) {
                this.nickname = nickname;
            }

            public String getTitle() {
                return title;
            }

            public void setTitle(String title) {
                this.title = title;
            }

            public String getType() {
                return type;
            }

            public void setType(String type) {
                this.type = type;
            }

            public String getTime() {
                if (time.contains("T")){
                    return ValidateUtils.getTimeByType(time,ValidateUtils.TIME_YMD);
                }else {
                    return time;
                }
            }

            public void setTime(String time) {
                this.time = time;
            }
        }
    }
}
